<template>
  <div class="home">
    <!-- 路由出口 -->
    <keep-alive include="find">
      <router-view></router-view>
    </keep-alive>
    <!-- 使用 tabBar 组件 -->
    <van-tabbar
      v-if="$route.meta.needTab"
      active-color="#e40137"
      inactive-color="#b4b4bd"
      route
    >
      <van-tabbar-item>
        <template #icon>
          <i class="iconfont iconicon_footbar_gs_sel myicon"></i>
        </template>
        公司
      </van-tabbar-item>
      <van-tabbar-item to="/question">
        <template #icon>
          <i class="iconfont iconicon_footbar_st_sel myicon"></i>
        </template>
        刷题
      </van-tabbar-item>
      <van-tabbar-item to="/find">
        <template #icon>
          <i class="iconfont iconicon_footbar_fx_nor myicon"></i>
        </template>
        发现
      </van-tabbar-item>
      <van-tabbar-item to="/my">
        <template #icon>
          <i class="iconfont iconicon_footbar_wode_nor myicon"></i>
        </template>
        我的
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data () {
    return {}
  }
}
</script>

<style lang="less" scoped>
.home {
  .myicon {
    font-size: 26px;
  }
}
</style>
